﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Person
{
    public class AccountingObjectCategory : BusinessObject
    {
        public AccountingObjectCategory()
        {
            AddRule(new ValidateRequired("AccountingObjectCategoryCode"));
            AddRule(new ValidateLength("AccountingObjectCategoryCode", 0, 20));

            AddRule(new ValidateRequired("AccountingObjectCategoryName"));
            AddRule(new ValidateLength("AccountingObjectCategoryName", 0, 255));

            AddRule(new ValidateRequired("RestaurantID"));
        }

        public AccountingObjectCategory(string accountingObjectCategoryId, string accountingObjectCategoryCode, string accountingObjectCategoryName,
                                            string parentId, bool isParent, bool isCustomer, bool isVendor, bool isEmployee ,string restaurantId, string description, bool isActive)
            : this()
        {
            AccountingObjectCategoryID = accountingObjectCategoryId;
            AccountingObjectCategoryCode = accountingObjectCategoryCode;
            AccountingObjectCategoryName = accountingObjectCategoryName;
            ParentID = parentId;
            IsParent = isParent;
            IsCustomer = isCustomer;
            IsVendor = isVendor;
            IsEmployee = IsEmployee;
            RestaurantID = restaurantId;
            Description = description;
            IsActive = isActive;
        }

        public string AccountingObjectCategoryID { get; set; }

        public string AccountingObjectCategoryCode { get; set; }

        public string AccountingObjectCategoryName { get; set; }

        public string ParentID { get; set; }

        public bool IsParent { get; set; }

        public bool IsCustomer { get; set; }

        public bool IsVendor { get; set; }

        public bool IsEmployee { get; set; }

        public string RestaurantID { get; set; }

        public string Description { get; set; }

        public bool IsActive { get; set; }
    }
}
